package com.lirh.mysql.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lirh.mysql.dao.TieziDao;
import com.lirh.mysql.entity.Tiezi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Service
public class TieziServiceImpl {
    @Autowired
    private TieziDao tieziDao;
    public List<Map<String, Object>> getTiezis(){
        return tieziDao.selectMaps(null );
    }
    public Tiezi getTiezisbyid(int id){
        return tieziDao.selectById(id);
    }
    public String insert(Tiezi teizi){
        tieziDao.insert(teizi);
        return "ok";
    }
}
